/* Copyright (c) 2009 SpringShowcase, Inc.
 * All right reserved.
 * http://code.google.com/p/springshowcase/
 * This software is the confidential and proprietary information of BeyondWeb
 * , Inc. You shall not disclose such Confidential Information and
 * shall use it only in accordance with the terms of the license agreement
 * you entered into with BeyondWeb.
 *
 * Revision History
 * Author              Date             Description
 * ------------------   --------------    ------------------
 *  taeki.kim           2010. 4. 2.        
*/

package org.springshowcase.core.commons.utils;

import java.util.Enumeration;
import java.util.List;

import org.apache.commons.collections.EnumerationUtils;
import org.apache.commons.lang.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * Collection 타입의 오브젝트를 유용하게 사용할 수 있는 유틸리티
 * 
 * @author kim.tae.ki
 * @version
 * @see
 * 
 * This file contains the declarations of String class and its helper classes.
 */
public final class CollectionUtils {

    // ---------------------------------------------------------------------
    // Class Variable Declaration
    // ---------------------------------------------------------------------
    
    /** 클래스에서 사용하는 로거. */
	private static final Logger logger = LoggerFactory
			.getLogger(CollectionUtils.class);

	// ---------------------------------------------------------------------
    // Constructor Method Declaration
    // ---------------------------------------------------------------------
	// ---------------------------------------------------------------------
    // DI Method (setter,getter) Declaration
    // ---------------------------------------------------------------------
	// ---------------------------------------------------------------------
    // this Method (public/private) Declaration
    // ---------------------------------------------------------------------

	/**
	 * Enum형 오브젝트를 List 형태로 리턴 한다.
	 * 
	 * @param enums the enums
	 * 
	 * @return the list< string>
	 */
	@SuppressWarnings("unchecked")
	public final static List<String> enumToList(Enumeration<?> enums) {
		List<String> list = EnumerationUtils.toList(enums);
		return list;
	}
	
	/**
	 * Array안에 있는 Elements의 순서를 역순으로 sorting 한다.
	 * 
	 * @param obejct the obejct
	 */
	public final  static void arrayReverse(Object [] obejct){
		ArrayUtils.reverse(obejct);
	}
	
	// ---------------------------------------------------------------------
    // interface implement Method (public/private) Declaration
    // ---------------------------------------------------------------------
    // ---------------------------------------------------------------------
    // abstract implement Method (public/private) Declaration
    // ---------------------------------------------------------------------
    // ---------------------------------------------------------------------
    // abstract Method (public/private) Declaration
    // ---------------------------------------------------------------------
	
}
